package com.summer.bilibili.controller;

import com.summer.bilibili.domain.video.VideoChannel;
import com.summer.bilibili.params.VideoChannelParams;
import com.summer.bilibili.service.VideoChannelService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


import java.util.List;

@RestController
@RequestMapping("/video/channel")
@RequiredArgsConstructor
public class VideoChannelController extends BaseController {
    private final VideoChannelService videoChannelService;

    @GetMapping("/list")
    public List< VideoChannel > list( @Validated VideoChannelParams search) {
        return videoChannelService.search(search);
    }
}
